<template>
	<view>
		<view class='productList'>
			<!-- <view class='search bg-color acea-row row-between-wrapper'>
				<view class="back" @click='set_where(1)'>
					<view class="iconfont icon-xiangzuo"></view>
				</view>
				<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
					<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" :value='where.keyword'
					 @confirm="searchSubmit"></input>
				</view>
				<view style="text-align: right;" class='iconfont' :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>
			</view> -->
			<!-- <view class="nav-wrapper">

					<view class='nav acea-row row-middle'>
						<view class='item' @click="downStatus = !downStatus" :class="{'font-color':downKey>0 && firstKey == 0}">
							{{downMenu[downKey].title}}
							<text v-if="!downStatus" class="iconfont icon-xiala1 spin"></text>
							<text v-else class="iconfont icon-xiala1"></text>
						</view>
						<view class='item' :class="{'font-color':firstKey == 3}" @click='set_where(3)'>
							销量
						</view>
						<view class='item' :class="{'font-color':firstKey == 2}" @click='set_where(2)'>
							价格
							<image v-if="price==1" src='/static/images/up.png'></image>
							<image v-else-if="price==2" src='/static/images/down.png'></image>
							<image v-else src='/static/images/horn.png'></image>
						</view>
						<view class='item' :class="{'font-color':firstKey == 4}" @click='bindRight'>
							筛选
							<text class="iconfont icon-shaixuan"></text>
						</view>
					</view>
			</view> -->

			<view class="swiper" v-if="imgUrls.length">
				<swiper indicator-dots="true" :autoplay="true" :circular="circular" :interval="interval"
					:duration="duration" indicator-color="#E4E4E4" indicator-active-color="#E93323" :current="swiperCur"
					@change="swiperChange">
					<block v-for="(item,index) in imgUrls" :key="index">
						<swiper-item :class="{active:index == swiperCur}">
							<navigator class='slide-navigator acea-row row-between-wrapper'
								hover-class='none'>
								<image :src="item.pic" class="slide-image"></image>
							</navigator>
						</swiper-item>
					</block>
				</swiper>
			</view>

			<!-- 权益 -->
			<view class="quanyi">
				<view class="quanyi-box">
					<view class="quanyi-title"><text class="orange">出行</text>权益</view>
					<view class="quanyi-container">
						<view :class="{'quanyi-one':true,'last-one':item.last}"  v-for="item in chuxing" @click="gotoUrl(item)">
							<view class="quanyi-img">
								<image style="width: 350rpx; height: 200rpx;"
									:src='item.img'>
								</image>
							</view>
							<view class="quanyi-text">{{item.title}}</view>
							<view class="quanyi-intro">{{item.intro}}</view>
						</view>
						
					</view>
				</view>
				
				<view class="quanyi-box">
					<view class="quanyi-title"><text class="blue">医疗健康</text>权益</view>
					<view class="quanyi-container">
						<view :class="{'quanyi-one':true,'last-one':item.last}"  v-for="item in jiankang" @click="gotoUrl(item)">
							<view class="quanyi-img">
								<image style="width: 350rpx; height: 200rpx;"
									:src='item.img'>
								</image>
							</view>
							<view class="quanyi-text">{{item.title}}</view>
							<view class="quanyi-intro">{{item.intro}}</view>
						</view>
						
					</view>
				</view>
				
				<view class="quanyi-box">
					<view class="quanyi-title"><text class="green">生活服务</text>权益</view>
					<view class="quanyi-container">
						<view :class="{'quanyi-one':true,'last-one':item.last}"  v-for="item in shenghuo" @click="gotoUrl(item)">
							<view class="quanyi-img">
								<image style="width: 350rpx; height: 200rpx;"
									:src='item.img'>
								</image>
							</view>
							<view class="quanyi-text">{{item.title}}</view>
							<view class="quanyi-intro">{{item.intro}}</view>
						</view>
						
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getProductslist,
		getProductHot,
		getBrandlist,
		storeMerchantList
	} from '@/api/store.js';
	import recommend from '@/components/recommend';
	import rightSlider from '@/components/rightSlider.vue'
	import {
		openBargainSubscribe
	} from '@/utils/SubscribeMessage.js';
	import {
		initiateAssistApi
	} from '@/api/activity.js';
	import {
		mapGetters
	} from "vuex";
	// #ifdef MP
	import authorize from '@/components/Authorize';
	// #endif
	import {
		goShopDetail
	} from '@/libs/order.js'
	const app = getApp();
	export default {
		computed: mapGetters(['uid', 'isLogin']),
		components: {
			recommend,
			rightSlider,
			// #ifdef MP
			authorize
			// #endif
		},
		watch: {},
		data() {
			return {
				productList: [],
				
				chuxing:[
					{title:'滴答出行',last:false,intro:'嘀嗒出行5折打折券',url:'https://tb.jiuxinban.com/6MvCEW',img:'http://favor.and361.com/uploads/fsd/滴答.jpg'},
					{title:'摩范出行',last:false,intro:'摩范出行超值体验券',url:'https://static.i-morefun.com/channel/index.html?channelCode=ZH10680077',img:'http://favor.and361.com/uploads/fsd/摩范出行超值体验券.jpg'},
					// {title:'滴滴出行',last:false,intro:'滴滴出行快车大礼包',url:'https://v.didi.cn/v/zGvOP',img:'http://favor.and361.com/uploads/fsd/'},
					{title:'快狗打车',last:false,intro:'快狗打车领红包',url:'https://huoyun.daojia.com/redpack/index.html?activityType=200&templateId=165&taskId=226910816958376752&hmsr=rukou_hebeiyidong_baoguanglei_app',img:'http://favor.and361.com/uploads/fsd/快狗打车领红包.jpg'},
					{title:'高德打车',last:false,intro:'高德打车30元打车券包',url:'https://cache.amap.com/activity/2020TaxiGetNew/index.html?gd_from=47ViqrLznV3',img:'http://favor.and361.com/uploads/fsd/高德打车30元打车券包.jpg'},
				],
				jiankang:[
					{title:'叮当快药',last:false,intro:'叮当快药10元现金券',url:'http://47.104.68.58/ticket274',img:'http://favor.and361.com/uploads/fsd/叮当快药10元现金券.jpg'},
					{title:'善诊体检',last:false,intro:'善诊体检',url:'https://m.shanzhen.me/cooperation/customize_examcoupon?comId=d8ced03cd4cd4327ab40d7984e9f1e80&activityCode=ACT771997478',img:'http://favor.and361.com/uploads/fsd/河北移动500元专属体检卡.jpg'},
					{title:'优健康体检',last:false,intro:'河北移动500元专属体检卡',url:'https://app.h5.ihaozhuo.com/channel-mall/h5pro.html?linkAlias=eJ2llrNH&wxAutoLogin=true',img:'http://favor.and361.com/uploads/fsd/优健康.jpg'},
					{title:'医加壹在线问问诊',last:false,intro:'',url:'https://mwx.doctorgroup.org.cn/hmo/guard/card_public?is_qrcode=1&channel=C10033&weixin_platform=25&from=agent_app&channel_name=hebei',img:'http://favor.and361.com/uploads/fsd/壹加壹免费领取会员卡.jpg'},
					{title:'快递问医生',last:false,intro:'领取问诊优惠券',url:'https://m.120.net/zhushou/app_coupon?source=cmcc',img:'http://favor.and361.com/uploads/fsd/领取问诊优惠券.jpg'},
					{title:'名医看牙',last:false,intro:'免费领取VIP',url:'http://mo.mingyikanya.com/MykyExchange/Exchange_hbyd_hyk.aspx',img:'http://favor.and361.com/uploads/fsd/名医看牙免费领取VIP.jpg'},
					{title:'好大夫在线问诊',last:false,intro:'联合义诊',url:'https://m.haodf.com/nopen/activity?partnerkey=3e5dfb310f89d77b',img:'http://favor.and361.com/uploads/fsd/联合义诊.jpg'},
					{title:'平安健康问诊',last:true,intro:'1年免费在线问诊',url:'https://m.health.pingan.com/activity/2020/inquiry_online/index.html?headpic=2020111215252840&re_from=sat_beijing_HBYD&order_from=sat_beijing_HBYD',img:'http://favor.and361.com/uploads/fsd/1年免费在线问诊.jpg'},
				],
				shenghuo:[
					{title:'美团红包',last:false,intro:'好店优惠券最高56元',url:'https://tb.jiuxinban.com/6N4hKz',img:'http://favor.and361.com/uploads/fsd/好店优惠券最高56元.jpg'},
					{title:'车安优洗车卡',last:false,intro:'1分钱领半价洗车年卡',url:'https://activity.vandyo.com/carwash/1/index.html?channel=HS',img:'http://favor.and361.com/uploads/fsd/1%E5%88%86%E9%92%B1%E9%A2%86%E5%8D%8A%E4%BB%B7%E6%B4%97%E8%BD%A6%E5%B9%B4%E5%8D%A1.jpg'},
					{title:'货拉拉',last:false,intro:'移动用户专享48元优惠券',url:'https://act.huolala.cn/rs/201903/act_user_ling/login.html?uuid=bqcokc',img:'http://favor.and361.com/uploads/fsd/货拉拉专享48元优惠券.jpg'},
					{title:'京东到家',last:false,intro:'百元超市买菜红包',url:'https://daojia.jd.com/pavilion/poseidon/djcoupon/index.html#/edison?id=247&channel=',img:'http://favor.and361.com/uploads/fsd/京东到家百元超市买菜红包.jpg'},
					{title:'多点购物',last:false,intro:'401元优惠券包',url:'https://a.dmall.com/act/Fq483JUQ6Kl7.html?nopos=0&tpc=a_143941',img:'http://favor.and361.com/uploads/fsd/多点购物401元优惠券包.jpg'},
					{title:'顾家猫装修',last:false,intro:'4999装修满减券',url:'https://tui.gujia-mao.com/cm/index.html',img:'http://favor.and361.com/uploads/fsd/顾家猫装修4999装修满减券.jpg'},
					// {title:'旺旺大礼包',last:false,intro:'180元优惠券礼包',url:'https://srv.hotkidceo.com/ceo/wechatCollectcoupons/?giftCode=aa48927f-3ad2-456e-8dbe-0e4fc1979a8b#/',img:'http://favor.and361.com/uploads/fsd/旺旺大礼包180元优惠券礼包.jpg'},
					{title:'顺丰同城',last:false,intro:'新用户首单5折',url:'https://openic.sf-express.com/marketing/h5/pullnewchannel?theme_id=4257360966571&channel_id=4257182458761&type=1&inviter_token=wDSNf83bDW-vp1iLb4OA93NmdGOIlEdw4pVbHgocixErejn0QNVwZKjCIM0n93s-KI6YIA',img:'http://favor.and361.com/uploads/fsd/顺丰同城新用户首单5折.jpg'},
					{title:'屈臣氏',last:false,intro:'75元大红包',url:'https://h5.watsons.com.cn/topic/T20201225131929632?f=hebeimobile',img:'http://favor.and361.com/uploads/fsd/屈臣氏75元大红包.jpg'},
				],
				// 是否第一个
				firstKey: 0,
				// tab切换
				tabIndex: 1,
				// 商铺列表
				storeList: [],
				sotreParam: {
					keyword: '',
					page: 1,
					limit: 10,
					order: ''
				},
				storeKey: 0,
				storeScroll: true,
				hide_mer_status: app.globalData.hide_mer_status,
				isShowAuth: false, //是否隐藏授权
				isAuto: false, //没有授权的不会自动授权
				imgUrls: [{
						name: 0,
						pic: 'http://favor.91huajuan.com/uploads/def/20210320/e1d5e77c343a8ef1a0999ecc4ddac179.jpg',
						url: ''
					},
					{
						name: 1,
						pic: 'http://favor.91huajuan.com/uploads/def/20210321/ea49c0976718080f96668b8a69650123.png',
						url: ''
					},
				],
				circular: true,
				interval: 3000,
				duration: 500,
				swiperCur: 0,
			};
		},
		onLoad: function(options) {
			// this.$set(this.where, 'cate_id', options.id || '');
			// this.title = options.title || '';
			// this.$set(this.where, 'keyword', options.searchValue || '');
			// this.get_product_list(true);
			// this.get_host_product();
		},
		onReady() {
			// uni.$on('update', (data) => {
			// 	this.hide_mer_status = data.hide_mer_status
			// })
		},
		mounted: function() {
			// const app = getApp();
			// this.$nextTick(() => {
			// 	this.hide_mer_status = app.globalData.hide_mer_status
			// });
		},
		methods: {
			// 授权回调
			onLoadFun() {
				this.isShowAuth = false
			},
			// 授权关闭
			authColse: function(e) {
				this.isShowAuth = e
			},
			gotoUrl(item){
				console.log(item)
				window.location.href=item.url
			},
			// 查找店铺
			storeMerchantList() {
				if (!this.storeScroll) return
				storeMerchantList({
					keyword: this.where.keyword,
					page: this.sotreParam.page,
					limit: this.sotreParam.limit,
					order: this.sotreParam.order
				}).then(res => {
					this.storeScroll = res.data.list.length >= this.sotreParam.limit
					this.sotreParam.page += 1
					this.storeList = this.storeList.concat(res.data.list)
				})
			},
			// 店铺排序
			storeTab(key) {
				this.storeKey = key
				if (key == 0) {
					this.sotreParam.order = ''
				} else if (key == 1) {
					this.sotreParam.order = 'sales'
				} else {
					this.sotreParam.order = 'rate'
				}
				this.sotreParam.page = 1
				this.storeScroll = true
				this.storeList = []
				this.storeMerchantList()
			},
			// 右侧切换
			bindRight() {
				this.price = 0;
				this.firstKey = 4
				this.getBrandlist()

			},
			// 品牌列表
			getBrandlist() {
				let temp = []
				getBrandlist({
					cate_id: this.where.cate_id,
					keyword: this.where.keyword
				}).then(res => {
					temp = res.data.list.map(item => {
						return {
							...item,
							check: false
						}
					})
					if (this.where.brand_id.length > 0) {
						this.where.brand_id.forEach((ids, index) => {
							temp.forEach(el => {
								if (ids == el.brand_id) {
									el.check = true
								}
							})
						})
					}
					this.brandList = temp
					this.rightBox = true
				})
			},
			// 去详情页
			// 组件确定
			confirm(data) {
				let arr = []
				if (data.brandList.length == 0) {
					this.where.brand_id = ''
				} else {
					data.brandList.forEach(item => {
						arr.push(item.brand_id)
					})
					this.where.brand_id = arr
				}
				this.rightBox = data.status
				this.where.price_on = data.price_on
				this.where.price_off = data.price_off
				this.loadend = false;
				this.$set(this.where, 'page', 1)
				this.get_product_list(true);

			},
			// 组件关闭
			close() {
				this.rightBox = false
			},
			// 下拉选项
			bindDown(item, index) {
				this.firstKey = 0
				if (index == 0) {
					this.where.order = ''
				} else if (index == 1) {
					this.where.order = 'rate'
				} else if (index == 2) {
					this.where.order = 'is_new'
				}
				this.downKey = index
				this.downStatus = false
				this.loadend = false;
				this.$set(this.where, 'page', 1)
				this.get_product_list(true);
			},
			Changswitch: function() {
				let that = this;
				that.is_switch = !that.is_switch
			},
			searchSubmit: function(e) {
				let that = this;
				that.$set(that.where, 'keyword', e.detail.value);
				if (this.tabIndex == 1) {
					that.loadend = false;
					that.$set(that.where, 'page', 1)
					this.get_product_list(true);
				} else {
					this.sotreParam.page = 1
					this.storeScroll = true
					this.storeList = []
					this.storeMerchantList()
				}

			},
			/**
			 * 获取我的推荐
			 */
			get_host_product: function() {
				// let that = this;
				// if (that.hotScroll) return
				// getProductHot(
				// 	that.hotPage,
				// 	that.hotLimit,
				// ).then(res => {
				// 	that.hotPage++
				// 	that.hotScroll = res.data.length < that.hotLimit
				// 	that.hostProduct = that.hostProduct.concat(res.data.list)
				// 	// that.$set(that, 'hostProduct', res.data)
				// });
			},
			//点击事件处理
			set_where: function(e) {
				switch (e) {
					case 1:
						uni.setStorageSync('storeIndex', this.where.cate_id);
						uni.navigateBack()
						break
					case 2:
						this.firstKey = e
						if (this.price == 0) {
							this.price = 1;
							this.where.order = 'price_asc'
						} else if (this.price == 1) {
							this.price = 2;
							this.where.order = 'price_desc'
						} else if (this.price == 2) {
							this.price = 0;
							this.where.order = ''
						}
						this.$set(this.where, 'page', 1)
						this.get_product_list(true);
						break;
					case 3:
						this.price = 0;
						this.loadend = false;
						this.$set(this.where, 'order', 'sales')
						this.$set(this.where, 'page', 1)
						this.get_product_list(true);
						this.firstKey = e
						break;
				}
				this.loadend = false;
				this.$set(this.where, 'page', 1);
				this.get_product_list(true);
			},
			//查找产品
			get_product_list: function(isPage) {
				let that = this;
				if (that.loadend) return;
				if (that.loading) return;
				if (isPage === true) that.$set(that, 'productList', []);
				that.loading = true;
				that.loadTitle = '';
				getProductslist(that.where).then(res => {
					let list = res.data.list;
					let productList = that.$util.SplitArray(list, that.productList);
					let loadend = list.length < that.where.limit;
					that.loadend = loadend;
					that.loading = false;
					that.loadTitle = loadend ? '已全部加载' : '加载更多';
					that.$set(that, 'productList', productList);
					that.$set(that.where, 'page', that.where.page + 1);
				}).catch(err => {
					that.loading = false;
					that.loadTitle = '加载更多';
				});
			},
			swiperChange(e) {
				// this.swiperCur = e.detail.current
				let {
					current,
					source
				} = e.detail
				if (source === 'autoplay' || source === 'touch') {
					//根据官方 source 来进行判断swiper的change事件是通过什么来触发的，autoplay是自动轮播。touch是用户手动滑动。其他的就是未知问题。抖动问题主要由于未知问题引起的，所以做了限制，只有在自动轮播和用户主动触发才去改变current值，达到规避了抖动bug
					this.swiperCur = e.detail.current
				}
			},
		},
		onPullDownRefresh() {

		},
		onReachBottom() {
			if (this.tabIndex == 1) {
				if (this.productList.length > 0) {
					this.get_product_list('');
				} else {
					this.get_host_product();
				}
			} else {
				this.storeMerchantList()
			}
		}
	}
</script>
<style lang="scss">
	.productList .search {
		width: 100%;
		height: 86rpx;
		padding: 0 20rpx;
		box-sizing: border-box;
		position: fixed;
		left: 0;
		top: 0;
		z-index: 9;
	}

	.productList .search .back {
		display: flex;
		align-items: center;
		width: 40rpx;
		height: 60rpx;

		.iconfont {
			color: #fff;
			font-size: 36rpx;
		}
	}

	.productList .search .input {
		width: 570rpx;
		height: 60rpx;
		background-color: #fff;
		border-radius: 50rpx;
		padding: 0 20rpx;
		box-sizing: border-box;
	}

	.productList .search .input input {
		flex: 1;
		height: 100%;
		font-size: 26rpx;
		margin-left: 10rpx;
	}

	.productList .search .input .placeholder {
		color: #999;
	}

	.productList .search .input .iconfont {
		font-size: 35rpx;
		color: #555;
	}

	.productList .search .icon-pailie,
	.productList .search .icon-tupianpailie {
		color: #fff;
		width: 62rpx;
		font-size: 40rpx;
		height: 86rpx;
		line-height: 86rpx;
	}

	.productList .nav-wrapper {
		z-index: 9;
		position: fixed;
		left: 0;
		top: 0;
		width: 100%;
		margin-top: 86rpx;
		background-color: $theme-color;

		.tab-bar {
			display: flex;
			align-items: center;

			.tab-item {
				position: relative;
				flex: 1;
				display: flex;
				justify-content: center;
				align-items: center;
				padding: 8rpx 0 20rpx;
				color: #fff;
				font-size: 28rpx;
				font-weight: bold;

				&::after {
					content: ' ';
					position: absolute;
					left: 50%;
					bottom: 18rpx;
					width: 30rpx;
					height: 3rpx;
					background: transparent;
					transform: translateX(-50%);
				}

				&.on {
					&::after {
						background: #fff;
					}
				}
			}
		}
	}

	.productList .nav {
		height: 86rpx;
		color: #454545;
		font-size: 28rpx;
		background-color: #fff;
		display: flex;
		justify-content: space-between;
		padding: 0 28rpx;
	}

	.productList .nav .item {
		display: flex;
		align-items: center;
		justify-content: center;
		flex: 1;
	}

	.productList .nav .item.font-color {
		font-weight: bold;
	}

	.productList .nav .item image {
		width: 15rpx;
		height: 19rpx;
		margin-left: 10rpx;
	}

	.productList .list {
		padding: 0 20rpx;
		margin-top: 168rpx;
	}

	.productList .list.on {
		background-color: #fff;
		border-top: 1px solid #f6f6f6;
	}

	.productList .list .item {
		position: relative;
		width: 345rpx;
		margin-top: 20rpx;
		background-color: #fff;
		border-radius: 20rpx;
	}

	.productList .list .item.on {
		width: 100%;
		display: flex;
		border-bottom: 1rpx solid #f6f6f6;
		padding: 30rpx 0;
		margin: 0;
	}

	.productList .list .item .pictrue {
		position: relative;
		width: 100%;
		height: 345rpx;
	}

	.productList .list .item .pictrue.on {
		width: 200rpx;
		height: 200rpx;
	}

	.productList .list .item .pictrue image {
		width: 100%;
		height: 100%;
		border-radius: 20rpx 20rpx 0 0;
	}

	.productList .list .item .pictrue image.on {
		border-radius: 6rpx;
	}

	.productList .list .item .text {
		padding: 20rpx 17rpx 26rpx 17rpx;
		font-size: 30rpx;
		color: #222;
	}

	.productList .list .item .text.on {
		width: 508rpx;
		padding: 0 0 0 22rpx;
	}

	.productList .list .item .text .money {
		display: flex;
		align-items: center;
		font-size: 26rpx;
		font-weight: bold;
		margin-top: 8rpx;
	}

	.productList .list .item .text .money.on {
		margin-top: 30rpx;
	}

	.productList .list .item .text .money .num {
		font-size: 34rpx;
	}

	.productList .list .item .text .money .ticket {
		margin-left: 10rpx;
		padding: 0 5rpx;
		font-weight: initial;
		font-size: 20rpx;
		border: 1px solid $theme-color;
		border-radius: 4rpx;
	}

	.productList .list .item .text .money .ticket-big {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 163rpx;
		height: 28rpx;
		margin-left: 10rpx;
		background-image: url(~static/images/yh.png);
		background-size: 100% 100%;
		font-size: 20rpx;
		font-weight: normal;
	}

	.productList .list .item .text .score {
		margin-top: 10rpx;
		color: #737373;
		font-size: 20rpx;
	}

	.productList .list .item .text .company {
		display: flex;
		align-items: center;
		color: #737373;
		font-size: 20rpx;
		margin-top: 10rpx;

		.flex {
			display: flex;
			align-items: center;
			margin-left: 10rpx;
			color: #282828;

			.iconfont {
				font-size: 16rpx;
				margin-top: 4rpx;
			}
		}
	}

	.productList .list .item .foot-bar {
		width: 100%;
		height: 52rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		background: linear-gradient(-90deg, $bg-star 0%, $bg-end 100%);
		border-radius: 0px 0px 16rpx 16rpx;
		color: #fff;
		font-size: 24rpx;

		.icon-fenxiang {
			font-size: 24rpx;
			margin-right: 10rpx;
		}

		&.on {
			position: absolute;
			right: 0;
			bottom: 30rpx;
			width: 180rpx;
			height: 44rpx;
			border-radius: 22rpx;
		}
	}

	.productList swiper,
	.swiper-item,
	image {
		width: 100%;
		height: 300rpx;
		border-radius: 10rpx;

	}

	.noCommodity {
		background-color: #fff;
		padding-bottom: 30rpx;
	}

	.spin {
		display: block;
		transform: rotate(180deg);
		font-size: 36rpx;
	}

	.icon-xiala1 {
		margin-top: 6rpx;
	}

	.icon-shaixuan {
		font-size: 30rpx;
		margin-left: 10rpx;
	}

	.down-wrapper {
		.bg {
			z-index: 8;
			position: fixed;
			left: 0;
			top: 0;
			width: 100%;
			height: 100%;
			background: rgba(0, 0, 0, .5);
		}

		.down-box {
			z-index: 8;
			position: fixed;
			left: 0;
			top: 170rpx;
			width: 100%;
			padding: 0 40rpx 28rpx 74rpx;
			background-color: #F8F8F8;
			border-radius: 0 0 24rpx 24rpx;

			.down-item {
				margin-top: 28rpx;
				font-size: 24rpx;
				color: #454545;

				&.on {
					color: $theme-color;
					background-image: url(~static/images/active.png);
					background-repeat: no-repeat;
					background-size: 21rpx 21rpx;
					background-position: center right;
				}
			}
		}
	}

	.store-wrapper {
		margin-top: 240rpx;
		border-top: 1px solid #F6F6F6;

		.star-box {
			display: flex;
			align-items: center;

			.star {
				position: relative;
				width: 111rpx;
				height: 19rpx;
				background: url(~pages/columnGoods/images/star.png);
				background-size: 111rpx 19rpx;
			}

			.star-active {
				position: absolute;
				left: 0;
				top: 0;
				width: 111rpx;
				height: 19rpx;
				overflow: hidden;
				background: url(~pages/columnGoods/images/star_active.png);
				background-size: 111rpx 19rpx;
			}

			.num {
				color: $theme-color;
				font-size: 24rpx;
				margin-left: 10rpx;
			}
		}

		.store-item {
			margin-bottom: 12rpx;
			padding: 40rpx 20rpx;
			background-color: #fff;

			.head {
				display: flex;
				align-items: center;
				justify-content: space-between;

				.left-wrapper {
					display: flex;
					align-items: center;

					.logo {
						width: 80rpx;
						height: 80rpx;

						image {
							width: 80rpx;
							height: 80rpx;
							border-radius: 6rpx;
						}
					}

					.con-box {
						margin-left: 20rpx;

						.name {
							font-size: 30rpx;
							color: #333;
							font-weight: bold;
						}
					}
				}

				.link {
					width: 114rpx;
					height: 50rpx;
					line-height: 50rpx;
					background: linear-gradient(-90deg, rgba(246, 122, 56, 1) 0%, rgba(241, 27, 9, 1) 100%);
					border-radius: 25rpx;
					text-align: center;
					color: #fff;
					font-size: 24rpx;
				}
			}

			.pic-wrapper {
				display: flex;
				margin-top: 30rpx;

				.pic-item {
					position: relative;
					width: 226rpx;
					height: 226rpx;
					margin-right: 16rpx;

					image {
						width: 226rpx;
						height: 226rpx;
						border-radius: 16rpx;
					}

					.price {
						position: absolute;
						right: 0;
						bottom: 0;
						height: 36rpx;
						padding: 0 10rpx;
						line-height: 36rpx;
						text-align: center;
						background: rgba(0, 0, 0, .5);
						border-radius: 16rpx 2rpx 16rpx 2rpx;
						color: #fff;
						font-size: 24rpx;

						text {
							font-size: 18rpx;
						}
					}

					&:nth-child(3n) {
						margin-right: 0;
					}
				}
			}
		}
	}
</style>

<style lang="scss">
	.quanyi {
		padding: 16rpx;
	}

	.quanyi-box {
		margin: 30rpx 0;
		.quanyi-title {
			font-size: 35rpx;
			font-weight: 600;
		}

		.quanyi-container {
			display: flex;
			flex-wrap: wrap;
			justify-content: space-around;
			.quanyi-one {
				width: 350rpx;
				height: 300rpx;
				background-color: white;
				margin: 13rpx 0;
				// flex-direction: column;
				// justify-content: center;
				box-shadow: 0 2rpx 0.18rpx 0 #d0d4ea;
				border-radius: 4rpx 4rpx 0 0;
				.quanyi-text{
					text-align: center;
					color: #404040;
					font-size: large;
				}
				.quanyi-intro{
					text-align: center;
					font-size: small;
					color: grey;
				}
			}
			.last-one{
				margin-right: auto;
			}
		}

		.orange {
			color: orange;
		}
		.blue{
			color: blue;
		}
		.green{
			color: green;
		}
	}
</style>
